package miaofusdk

/**
招行支付的订单数据
*/
type MyBankOrder struct {
	Id                   int    `json:"id"`
	RequestTradeNo       string `json:"request_trade_no"`
	MerchantOrderNo      string `json:"merchant_order_no"`
	OrderNo              string `json:"order_no"`
	PayAmount            int    `json:"pay_amount"`
	MerchantId           string `json:"merchant_id"`
	Attach               string `json:"attatch"`
	CreateTime           string `json:"create_time"`
	PayTime              string `json:"pay_time"`
	BankType             string `json:"bank_type"`
	PayChannelOrderNo    string `json:"pay_channel_order_no"`
	SubAppId             string `json:"sub_app_id"`
	ChnCoupon            int    `json:"chn_coupon"`
	BuyerUserName        string `json:"buyer_user_name"`
	BuyerUserId          string `json:"buyer_user_id"`
	Credit               string `json:"credit"`
	ActualPayAmount      int    `json:"actual_pay_amount"`
	ReceiptAmount        int    `json:"receipt_amount"`
	InvoiceAmount        int    `json:"invoice_amount"`
	PrePayId             string `json:"pre_pay_id"`
	PayInfo              string `json:"pay_info"`
	PayResult            string `json:"pay_result"`
	TradeType            string `json:"trade_type"`
	Subject              string `json:"subject"`
	GoodsDetail          string `json:"goods_detail"`
	GoodsTag             string `json:"goods_tag"`
	TerminalCode         string `json:"terminal_code"`
	OperId               string `json:"oper_id"`
	SettleType           string `json:"settle_type"`
	OrgCode              string `json:"org_code"`
	ShopCode             string `json:"shop_code"`
	StoreCode            string `json:"store_code"`
	BarCode              string `json:"bar_code"`
	StoreName            string `json:"store_name"`
	TradeChannel         string `json:"trade_channel"`
	CodeUrl              string `json:"code_url"`
	CancelTime           string `json:"cancel_time"`
	FrontUrl             string `json:"front_url"`
	BackNotifyUrl        string `json:"back_notify_url"`
	OpenId               string `json:"open_id"`
	SubOpenId            string `json:"sub_open_id"`
	DeviceCreateIp       string `json:"device_create_ip"`
	ExpireExpress        string `json:"expire_express"`
	PayLimit             string `json:"pay_limit"`
	DiscountableAmount   int    `json:"discountable_amount"`
	UndiscountableAmount int    `json:"undiscountable_amount"`
	CheckLaterNm         int    `json:"check_later_nm"`
}

type MyBankRefundOrder struct {
	Id                   int    `json:"id"`
	RequestTradeNo       string `json:"request_trade_no"`
	MerchantOrderNo      string `json:"merchant_order_no"`
	RefundTradeNo        string `json:"refund_trade_no"`
	TotalAmount          int    `json:"total_amount"`
	RefundAmount         int    `json:"refund_amount"`
	TerminalCode         string `json:"terminal_code"`
	ChannelRefundTradeNo string `json:"channel_refund_trade_no"`
	TimeEnd              string `json:"time_end"`
	RefundTime           string `json:"refund_time"`
	TradeType            string `json:"trade_type"`
	MerchantId           string `json:"merchant_id"`
	StoreCode            string `json:"store_code"`
	ShopCode             string `json:"shop_code"`
	OrgCode              string `json:"org_code"`
	StoreName            string `json:"store_name"`
	TradeChannel         string `json:"trade_channel"`
	TradeStatus          string `json:"trade_status"`
	RefundResult         string `json:"refund_result"`
	RefundOperId         string `json:"refund_oper_id"`
	RefundReason         string `json:"refund_reason"`
	RefundTerminalCode   string `json:"refund_termianl_code"`
}

type RespMyBankOrderDetail struct {
	//订单数据
	Order MyBankOrder `json:"order,omitempty"`
	//这笔订单下包含的所有退款成功和撤单成功的记录
	RefundOrder []MyBankRefundOrder `json:"refund_order,omitempty"`
}

type RespMyBankOrder struct {
	Response
	Data RespMyBankOrderDetail `json:"data,omitempty"`
}

/**
订单详情..
交易成功的直接返回.
非成功的.主动确认一次
*/
